package Io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("test.txt");
        String line = "我是这路上没有名字的人，我没有新闻没有人评论.";
        byte[] data = line.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        data = ("要拼尽所有换的普通的剧本，辗转反侧不过谋生。".getBytes(StandardCharsets.UTF_8));
        fos.write(data);
        System.out.println("写出完毕");
        fos.close();
    }
}
